package com.ccrfid.rmc6.entity.alarm.pojo;

import java.io.Serializable;
import java.util.Objects;

public class PersonnelDto implements Serializable {
    private Long personnelId;
    private String personnelName;

    public PersonnelDto() {
    }

    public PersonnelDto(Long personnelId, String personnelName) {
        this.personnelId = personnelId;
        this.personnelName = personnelName;
    }

    public Long getPersonnelId() {
        return personnelId;
    }

    public void setPersonnelId(Long personnelId) {
        this.personnelId = personnelId;
    }

    public String getPersonnelName() {
        return personnelName;
    }

    public void setPersonnelName(String personnelName) {
        this.personnelName = personnelName;
    }

    @Override
    public int hashCode() {
        if (personnelId != null) {
            return personnelId.intValue();
        } else {
            return 0;
        }
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        PersonnelDto personnelDto = (PersonnelDto) obj;
        return Objects.equals(personnelId, personnelDto.getPersonnelId());
    }
}
